package com.alog.yzd.bookmall.service.admin.admin;

import com.alog.yzd.bookmall.dao.admin.admin.AdminDao;
import com.alog.yzd.bookmall.domain.admin.admin.Admin;

import java.sql.SQLException;

public class AdminService {
    private AdminDao adminDao = new AdminDao();

    /**
     * 登陆
     * @return
     */
    public Admin login(Admin admin){
        try {
            return adminDao.find(admin.getAdminname(), admin.getAdminpwd());
        } catch (SQLException e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }
}
